#include <iostream>
#include <sstream>
#include "List.h"

using namespace std;

int main() {

	List aList;
	for (int i = 0; i < 10; i++)
		aList.addLast(i);
	aList.display();
	aList.addPos(100, 2);
	aList.addPos(99, 0);
	aList.display();
	cout << "size : " << aList.size();
	cout << endl << aList.getElemByPos(4);
	cout << endl << aList.isExist(100) << "; " << aList.isExist(99) << endl;
	cout << endl;
	aList.reverse();
	aList.display();
	List *l = &aList;
	l->display();
	l -> addFirst(234);
	aList.display();

	List bList;
	for(int i=9; i>0; i--)
		bList.addLast(i);
	cout<<"\n\nBefore sort : ";
	bList.display();
	cout<<"sort: "<<endl;
	bList.sort();
	bList.display();

	List *a = List::buildLinkedList();
	List *b = List::buildLinkedList();
	a->sort();
	b->sort();
	List::mergeSortedList(a,b);
	a->display();
	b->display();
	return 0;
}

/*
 *
 *
 *
 *
 *
 *
 */
